package com.dlwx.firefighting.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.dlwx.firefighting.R;

/**
 * Created by Administrator on 2017/9/7.
 */

public class GridImgAdapter extends ListBaseAdapter<String> {

    private Context context;

    public GridImgAdapter(Context context) {
        super(context);
        this.context=context;
    }
    @Override
    public int getLayoutId() {
        return R.layout.item_img;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        String imgUrl=getDataList().get(position);
        ImageView imageView=holder.getView(R.id.imageView);
        Glide.with(context).load(imgUrl).error(R.mipmap.error_small).placeholder(R.mipmap.error_small).into(imageView);
    }
}
